@ECHO OFF

REM Set environment variables for interesting paths that scripts might need access to.
PUSHD %~dp0
SET SCALAR_SCRIPTSDIR=%CD%
POPD

CALL :RESOLVEPATH "%SCALAR_SCRIPTSDIR%\.."
SET SCALAR_SRCDIR=%_PARSED_PATH_%

CALL :RESOLVEPATH "%SCALAR_SRCDIR%\.."
SET SCALAR_ENLISTMENTDIR=%_PARSED_PATH_%

SET SCALAR_OUTPUTDIR=%SCALAR_ENLISTMENTDIR%\out

REM Clean up
SET _PARSED_PATH_=

GOTO :EOF

:RESOLVEPATH
SET "_PARSED_PATH_=%~f1"
GOTO :EOF
